<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="OnlineAnadolu._Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body style="text-align:center">
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
    <div>
        &nbsp;<table style="width: 489px; height: 379px">
            <tr>
                <td>
                    <asp:Label ID="lb_Name" runat="server" Text="isim:"></asp:Label></td>
                <td colspan="2" align="left">
                    <asp:TextBox ID="tb_Name" runat="server"></asp:TextBox></td>
                <td align="left" colspan="1">
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lb_KullaniciAdi" runat="server" Text="Kullanici Adi:"></asp:Label></td>
                <td colspan="2" align="left">
                    <asp:TextBox ID="tb_KullaniciAdi" runat="server"></asp:TextBox></td>
                <td align="left" colspan="1">
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lb_Email" runat="server" Text="E-Mail"></asp:Label></td>
                <td colspan="2" align="left">
                    <asp:TextBox ID="tb_EMail" runat="server" Width="145px"></asp:TextBox>
                    <asp:DropDownList ID="ddl_EMAil" runat="server" Width="127px">
                        <asp:ListItem>@anadolu.edu.tr</asp:ListItem>
                    </asp:DropDownList></td>
                <td align="left" colspan="1">
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lb_Adres" runat="server" Text="Adres:"></asp:Label></td>
                <td colspan="2" align="left">
                    <asp:TextBox ID="tb_Adres" runat="server" Width="275px"></asp:TextBox></td>
                <td align="left" colspan="1">
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lb_Adres2" runat="server" Text="Adres2:"></asp:Label></td>
                <td colspan="2" align="left">
                    <asp:TextBox ID="tb_Adres2" runat="server" Height="22px" Width="275px"></asp:TextBox></td>
                <td align="left" colspan="1">
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lb_EvTelefon" runat="server" Text="Ev Telefon:"></asp:Label></td>
                <td colspan="2" align="left">
                    <asp:TextBox ID="tb_EvTelefon" runat="server"></asp:TextBox></td>
                <td align="left" colspan="1">
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lb_CepTelefon" runat="server" Text="Cep Telefon:"></asp:Label></td>
                <td colspan="2" align="left">
                    <asp:TextBox ID="TextBox7" runat="server"></asp:TextBox></td>
                <td align="left" colspan="1">
                </td>
            </tr>
            <tr>
                <td style="height: 16px" valign="bottom">
                    <asp:Label ID="lb_Fakulte" runat="server" Text="Fakulte:"></asp:Label></td>
                <td colspan="2" align="left" rowspan="2" valign="top">
                    &nbsp;<asp:UpdatePanel ID="UpdatePanel1" runat="server">
                        <ContentTemplate>
                            <asp:DropDownList ID="ddl_Fakulte" runat="server" AutoPostBack="True" DataSourceID="SqlDataSource2"
                                DataTextField="facultyname" DataValueField="facultyid">
                            </asp:DropDownList>
                            <br />
                            <asp:DropDownList ID="ddl_Bolum" runat="server" DataSourceID="SqlDataSource3" DataTextField="departmentname"
                                DataValueField="departmentid">
                            </asp:DropDownList>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                    <br />
                </td>
                <td align="left" colspan="1" rowspan="2" valign="top">
                </td>
            </tr>
            <tr>
                <td style="height: 9px" valign="top">
                    <asp:Label ID="lb_Bolum" runat="server" Text="Bolum:"></asp:Label></td>
            </tr>
            <tr>
                <td valign="bottom">
                    <asp:Label ID="lb_Semt" runat="server" Text="Semt:"></asp:Label></td>
                <td colspan="2" align="left" rowspan="2" valign="middle">
                    <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                        <ContentTemplate>
                            <asp:DropDownList ID="ddl_Semt" runat="server" AutoPostBack="True" DataSourceID="SqlDataSource4"
                                DataTextField="statename" DataValueField="pkid">
                            </asp:DropDownList>
                            <br />
                            <asp:DropDownList ID="ddl_Mahalle" runat="server" DataSourceID="SqlDataSource5" DataTextField="localname"
                                DataValueField="fkid">
                            </asp:DropDownList>
                        </ContentTemplate>
                        <Triggers>
                            <asp:AsyncPostBackTrigger ControlID="ddl_Semt" />
                            <asp:AsyncPostBackTrigger ControlID="ddl_Mahalle" />
                        </Triggers>
                    </asp:UpdatePanel>
                </td>
                <td align="left" colspan="1" rowspan="2" valign="middle">
                </td>
            </tr>
            <tr>
                <td valign="top" style="height: 49px">
                    <asp:Label ID="lb_Mahalle" runat="server" Text="Mahalle:"></asp:Label></td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lb_Cinsiyet" runat="server" Text="Cinsiyet:"></asp:Label></td>
                <td align="left" colspan="2">
                    <asp:DropDownList ID="ddl_Cinsiyet" runat="server">
                        <asp:ListItem Selected="True" Value="0">Seciniz</asp:ListItem>
                        <asp:ListItem Value="1">Bay</asp:ListItem>
                        <asp:ListItem Value="2">Bayan</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td align="left" colspan="1">
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td align="left" colspan="2">
                    <asp:Button ID="bt_Kaydet" runat="server" OnClick="bt_Kaydet_Click" Text="Kaydet" /></td>
                <td align="left" colspan="1">
                </td>
            </tr>
        </table>
    
    </div>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:shoppingConnectionString %>"
            SelectCommand="SELECT [facultyid], [facultyname] FROM [faculty]"></asp:SqlDataSource>
        &nbsp;
        <asp:TextBox ID="tb_LastVisit" runat="server" Visible="False"></asp:TextBox>
        <asp:GridView ID="GridView1" runat="server">
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:shoppingConnectionString %>"
            SelectCommand="SELECT [departmentid], [departmentname] FROM [department] WHERE ([facultyid] = @facultyid)">
            <SelectParameters>
                <asp:ControlParameter ControlID="ddl_Fakulte" Name="facultyid" PropertyName="SelectedValue"
                    Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDataSource4" runat="server" ConnectionString="<%$ ConnectionStrings:shoppingConnectionString %>"
            SelectCommand="SELECT [pkid], [statename] FROM [states]"></asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDataSource5" runat="server" ConnectionString="<%$ ConnectionStrings:shoppingConnectionString %>"
            SelectCommand="SELECT [fkid], [localname] FROM [locals] WHERE ([pkid] = @pkid)">
            <SelectParameters>
                <asp:ControlParameter ControlID="ddl_Semt" Name="pkid" PropertyName="SelectedValue"
                    Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:shoppingConnectionString %>"></asp:SqlDataSource>
    </form>
</body>
</html>
